﻿CREATE TABLE [dbo].[TemplateMsgContent] (
    [Id]         BIGINT            IDENTITY (1, 1) NOT NULL,
    [BkMemberId] BIGINT            CONSTRAINT [DF_TemplateMsgContent_BkMemberId] DEFAULT -1 NOT NULL,
    [WxUserId]   BIGINT            CONSTRAINT [DF_TemplateMsgContent_WxUserId] DEFAULT -1 NOT NULL,
	[Url]   NVARCHAR(1000) NULL,
	[First] NVARCHAR(200) NULL,
	[Remark] NVARCHAR(200) NULL,
	[MsgType] NVARCHAR(20) NULL,
    [Contents]   NTEXT NULL,
    [Title]      NVARCHAR(1000) NULL,
    [Status]     INT            NOT NULL,
    [UpdateTime] DATETIME       NOT NULL,
    [CreatTime]  DATETIME       NOT NULL,
    CONSTRAINT [PK_TemplateMsgContent] PRIMARY KEY CLUSTERED ([Id] ASC)
);




GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'数据创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TemplateMsgContent', @level2type = N'COLUMN', @level2name = N'CreatTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'读取时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TemplateMsgContent', @level2type = N'COLUMN', @level2name = N'UpdateTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'0表示未读，1表示已读', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TemplateMsgContent', @level2type = N'COLUMN', @level2name = N'Status';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'通知内容概要', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TemplateMsgContent', @level2type = N'COLUMN', @level2name = N'Title';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'通知内容(json格式)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TemplateMsgContent', @level2type = N'COLUMN', @level2name = N'Contents';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TemplateMsgContent', @level2type = N'COLUMN', @level2name = N'BkMemberId';



GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'详情地址',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'TemplateMsgContent',
    @level2type = N'COLUMN',
    @level2name = N'Url'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'首行内容',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'TemplateMsgContent',
    @level2type = N'COLUMN',
    @level2name = N'First'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'说明',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'TemplateMsgContent',
    @level2type = N'COLUMN',
    @level2name = N'Remark'
GO

EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'用户ID',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'TemplateMsgContent',
    @level2type = N'COLUMN',
    @level2name = N'WxUserId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'消息类型:0预约成功，1缴费成功 2 预约报到提醒，4退款成功通知',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'TemplateMsgContent',
    @level2type = N'COLUMN',
    @level2name = N'MsgType'